#ifndef __EVENTLIST_H_
#define __EVENTLIST_H_
#include "KLib.h"
#include "NonCopyable.h"
#include "Event.h"
SK

class EventList : public NonCopyable
{
private:
    HANDLE *han;
    u32 numEvents;
public:
    EventList (u32 numEvents, bool initialStates=false);
    ~EventList ();

    Event *getEvent (u32 index);

    void signalAll (void);
    void resetAll (void);
    void signal (u32 index);
    void reset (u32 index);
    
    bool waitFor (u32 index);
    bool waitFor (u32 index, u32 timeout);
    bool waitForAll (void);
    bool waitForAll (u32 timeout);
    int waitForAny (void);
    int waitForAny (u32 timeout);
};

EK
#endif